package com.example.demo.mapper;

import com.example.demo.entity.ProductCategory;

import java.util.List;
import java.util.Map;

/**
 * Created by hongzhenyue on 18/3/5.
 */
public interface CategoryMapper {

    ProductCategory findByCategoryType(Integer categoryType);

    List<ProductCategory> findByCategoryName(String categoryName);

    //以map的方式插入
    int insertByMap(Map<String, Object> map);

    //以对象的方式插入
    int insertByObject(ProductCategory productCategory);

    //以对象的方式update
    int updateByObject(ProductCategory category);

    //删除
    int deleteByCategoryType(Integer categoryType);
}
